package com.demo.io.characterstream;

import org.junit.jupiter.api.Test;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * @author wangning
 * @date 2023/12/22 16:12
 * @description
 */
public class FileWriterTest {

    @Test
    public void test01() {
        try (Writer output = new FileWriter("src/main/resources/file/file_writer.txt")) {
            output.write("你好，我是Java。");
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
